package org.zjx.command.entity.screen;

import lombok.Data;
import org.zjx.command.enums.TeleportType;

import java.awt.*;

//传送
@Data
public class Teleport {
    public final String fromScene;
    public final Point from;
    public final String toScene;
    public final Point toPos;
    public final Point clickPos;
    public final Npc npc;
    public final TeleportType type;

    public Teleport(String fromScene,Point from, String toScene, Point toPos, Point clickPos,Npc npc, TeleportType type) {
        this.fromScene = fromScene;
        this.clickPos = clickPos;
        this.from = from;
        this.toScene = toScene;
        this.toPos = toPos;
        this.npc = npc;
        this.type = type;
    }

    public Address getFrom() {
        return new Address(fromScene,from.x,from.y);
    }

    public Address getTo() {
        return new Address(toScene,toPos.x,toPos.y);
    }
}
